package com.dd.stack.mybatisplus.controller.enumeration;

import com.dd.stack.common.util.response.ApiResponse;
import com.dd.stack.mybatisplus.config.enumeration.EnumRegistrar;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/6/8 11:39
 * @Description 提供枚举信息
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/enum")
@Api(tags = "提供全量枚举信息")
public class EnumController {

    @GetMapping("/list")
    @ApiOperation("提供全量枚举信息")
    public ApiResponse<Map<String, Map<String, String>>> list(){
        return ApiResponse.success(EnumRegistrar.enumMap());
    }
}
